<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        var obj = {
            name: 'zhangsan',
            age: 19,
            gender: 'male'
        }
        var attrName = Object.keys(obj) //将对象的属性名合并为一个类数组对象 Array(3)  0: "name" 1: "age" 2: "gender" length: 3  __proto__: Array(0)
        console.log(attrName)
        var attrValue = Object.values(obj) //将对象的属性值合并为一个类数组对象Array(3)    0: "zhangsan"  1: 19  2: "male"   length: 3  __proto__: Array(0)
​
        console.log(attrValue)
    </script>
</body>
</html>